home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / GLUT-3.7 / PROGS / ADVANCED / TEXTMAP.H < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-12  |  635 b   |  31 lines

  1. #ifndef TEXTMAPDEF
  2. #define TEXTMAPDEF
  3.  
  4. #define LETTER_INDEX 1
  5.  
  6. typedef struct texchardesc {
  7.   float movex;          /* advance */
  8.   int haveimage;
  9.   float llx, lly;       /* geometry box */
  10.   float urx, ury;
  11.   float tllx, tlly;     /* texture box */
  12.   float turx, tury;
  13.   float data[3 * 8];
  14. } texchardesc;
  15.  
  16. typedef struct texfnt {
  17.   short charmin, charmax;
  18.   short nchars;
  19.   float pixhigh;
  20.   texchardesc *chars;
  21.   short rasxsize, rasysize;
  22.   unsigned short *rasdata;
  23. } texfnt;
  24.  
  25. texfnt *readtexfont(char *name);
  26. float texstrwidth(char *str);
  27. int texfntinit(char *file);
  28. void texfntstroke(char *s, float xoffset, float yoffset);
  29.  
  30. #endif
  31.